package com.example.demo.mapper;

import com.example.demo.pojo.dbRole;
import com.example.demo.pojo.dbUser;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper{

    List<dbUser> select();

    dbUser selectOne(String username, String userpwd);

    dbRole selectEdit(Integer fid);

    dbUser selectAdmin(String username, String userpwd);

    @Delete("delete from db_user where id=#{id}")
    int deleteById(Integer id);

    int insert(dbUser user);

    int update(dbUser user);
}
